Formatting Cross References

@d Write file defs @ if (name->defs->next) fputs("
vspace-1ex", tex_file); fputs("
footnotesize
addtolength
baselineskip-1ex", tex_file); fputs("
beginlist
setlength
itemsep-
parsep", tex_file); fputs("
setlength
itemindent-
leftmargin", tex_file); fputs("
item File defined by scraps ", tex_file); print_scrap_numbers(tex_file, name->defs); fputs("
endlist", tex_file); else fputs("
vspace-2ex", tex_file); @

@d Write macro defs @ fputs("
vspace-1ex", tex_file); fputs("
footnotesize
addtolength
baselineskip-1ex", tex_file); fputs("
beginlist
setlength
itemsep-
parsep", tex_file); fputs("
setlength
itemindent-
leftmargin", tex_file); if (name->defs->next) fputs("
item Macro defined by scraps ", tex_file); print_scrap_numbers(tex_file, name->defs); @

@d Write macro refs @ if (name->uses) if (name->uses->next) fputs("
item Macro referenced in scraps ", tex_file); print_scrap_numbers(tex_file, name->uses); else fputs("
item Macro referenced in scrap ", tex_file); write_single_scrap_ref(tex_file, name->uses->scrap); fputs(".", tex_file); else fputs("
item Macro never referenced.", tex_file); fprintf(stderr, "command_name, name->spelling); fputs("
endlist", tex_file); @

@o latex.c @static void print_scrap_numbers(tex_file, scraps) FILE *tex_file; Scrap_Node *scraps; int page; write_scrap_ref(tex_file, scraps->scrap, TRUE, &page); scraps = scraps->next; while (scraps) write_scrap_ref(tex_file, scraps->scrap, FALSE, &page); scraps = scraps->next; fputs(".", tex_file); @| print_scrap_numbers @